﻿@model YodaMaster.Models.CartViewModel

@{
    ViewBag.Title = "Schedule Cart";
}

<p></p>
<p></p>


        @Html.ActionLink("Add a Course", "../Courses")


        @Html.ActionLink("View Schedules", "../Schedule/Index")
  

@Html.ActionLink("View Tests","../Schedule/View_Tests")




<h3>
    <em>Review</em> your cart:
 </h3>


<div id="update-message">
</div>
<table>
    <tr>
        <th>
            Faculty
        </th>
        <th>
            Course Id
        </th>
        <th>
            Course Name
        </th>
        <th>
            Course Points
        </th>
        <th></th>
    </tr>
    @foreach (var item in Model.CartItems)
    {
        <tr id="row-@item.RecordId">
            <td>
                @item.faculty
            </td>
            <td>
                @item.id
            </td>
               <td>
                @item.name
            </td>
               <td>
                @item.points
            </td>
            <td>
@Html.ActionLink("Delete", "RemoveFromCart", new { id = item.id })
            </td>
        </tr>
    }
    <tr>
        <td>
            Total
        </td>
        <td>
        </td>
        <td>
        </td>
        <td id="cart-total">
            @Model.CartTotal
        </td>
    </tr>
</table>